﻿/*
 *  Copyright (C) 2010 by Benjamin Nolmans <benjamin.nolmans@gmail.com>
 *  and Barbara Post <postb99@gmail.com>
 *  Copyright (C) 2010 by Barbara Post postb99@gmail.com>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

using System;

namespace OsamesFrameworkCore
{
    /// <summary>
    /// Interface that a non-static class willing to use OsamesFrameworkCore.Logging.LoggerService log methods should implement
    /// (to implement Log(LogLevel, string) declared in this interface as a call to OsamesFrameworkCore.Logging.LoggerService(this, LogLevel, string).
    /// If a class wants to call OsamesFrameworkCore.Logging.LoggerService in its static methods, it should use OsamesFrameworkCore.Logging.LoggerService(Type, LogLevel, string)
    /// </summary>
    public interface ILoggable
    {
        /// <summary>
        /// Call to logging.
        /// Implementation to use is the following :
        /// OsamesFrameworkCore.Logging.LoggerService(this, LogLevel, string, [object[]]).
        /// </summary>
        /// <param name="eLogLevel_">Osames log level</param>
        /// <param name="strMessage_">Message</param>
        /// <param name="strMessageDetails_">Optional array of message details. In this case, strMessage_ parameter contains placeholders, each matching a value in strMessageDetails_</param>
        void Log(Logging.LogLevel eLogLevel_, string strMessage_, object[] strMessageDetails_ = null);

        /// <summary>
        /// Call to logging.
        /// Implementation to use is the following :
        /// OsamesFrameworkCore.Logging.LoggerService(this, LogLevel, string, Exception).
        /// </summary>
        /// <param name="eLogLevel_">Osames log level</param>
        /// <param name="strMessage_">Message</param>
        /// <param name="ex_">Exception we will log message and stack trace of</param>
        void Log(Logging.LogLevel eLogLevel_, string strMessage_, Exception ex_);

    }
}
